import { reqRestauranDataSearch, reqRecommendList } from '../api/index.js'
import { GETSEARCHDATA, GETRECOMMENDLIST } from './mutations-type'
export default {
    //获取 搜索页面的数据
    async getSearchData({ commit }, callback) {
        const res = await reqRestauranDataSearch({ restaurant_id: 1 })
        commit(GETSEARCHDATA, { res })
        console.log(1)
        callback && callback()
    },
    //获取 推荐页面的数据
    async getRecommendList({ commit }, paras) {
        const res = await reqRecommendList(paras)
        commit(GETRECOMMENDLIST, res.message)
        paras.callback && paras.callback()
    }
}